import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userInfo:localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):null
  },
  mutations: {
    setUserInfo(state,info){
      state.userInfo = info 
      },
      removeUserInfo(state){
      state.userInfo = null
      }
  },
  actions: {
  },
  modules: {
  }
})
